import request from '@/router/axios';
import {downloadExcel} from '@/router/axios';
import {formatCondition} from '@/util/util';
//单条查询
export const queryMcHistoryMsgRecord = (params) => {
  params.head.transCode = 'queryMcHistoryMsgRecord';
  return request({
    url: '/mc/mcHistoryMsgRecord/queryMcHistoryMsgRecord',
    method: 'post',
    data: params
  })
}
//多条列表查询，支持条件查询
export const queryMcHistoryMsgRecordListPage = (params) => {
  params.head.transCode = 'queryMcHistoryMsgRecordListPage';
  return request({
    url: '/mc/mcHistoryMsgRecord/queryMcHistoryMsgRecordListPage',
    method: 'post',
    data: params
  })
}
//新增单条记录
export const saveMcHistoryMsgRecord = (params) => {
  params.head.transCode = 'saveMcHistoryMsgRecord';
  return request({
    url: '/mc/mcHistoryMsgRecord/saveMcHistoryMsgRecord',
    method: 'post',
    data: params
  })
}
//新增多条记录
export const saveMcHistoryMsgRecordList = (params) => {
  params.head.transCode = 'saveMcHistoryMsgRecordList';
  return request({
    url: '/mc/mcHistoryMsgRecord/saveMcHistoryMsgRecordList',
    method: 'post',
    data: params
  })
}
//新增或修改单条记录
export const saveOrUpdateMcHistoryMsgRecord = (params) => {
  params.head.transCode = 'saveOrUpdateMcHistoryMsgRecord';
  return request({
    url: '/mc/mcHistoryMsgRecord/saveOrUpdateMcHistoryMsgRecord',
    method: 'post',
    data: params
  })
}


//新增或修改单条记录
export const saveOrUpdateMcHistoryMsgRecordList = (params) => {
  params.head.transCode = 'saveOrUpdateMcHistoryMsgRecordList';
  return request({
    url: '/mc/mcHistoryMsgRecord/saveOrUpdateMcHistoryMsgRecordList',
    method: 'post',
    data: params
  })
}

//修改单条记录
export const updateMcHistoryMsgRecord = (params) => {
  params.head.transCode = 'updateMcHistoryMsgRecord';
  return request({
    url: '/mc/mcHistoryMsgRecord/updateMcHistoryMsgRecord',
    method: 'post',
    data: params
  })
}

//删除单条记录
export const deleteMcHistoryMsgRecord = (params) => {
  params.head.transCode = 'deleteMcHistoryMsgRecord';
  return request({
    url: '/mc/mcHistoryMsgRecord/deleteMcHistoryMsgRecord',
    method: 'post',
    data: params
  })
}

//删除多条记录
export const deleteMcHistoryMsgRecordList = (params) => {
  params.head.transCode = 'deleteMcHistoryMsgRecordList';
  return request({
    url: '/mc/mcHistoryMsgRecord/deleteMcHistoryMsgRecordList',
    method: 'post',
    data: params
  })
}
//导出excel
export const exportMcHistoryMsgRecordExcel = (params) => {
  downloadExcel({
    url: '/mc/mcHistoryMsgRecord/excelDownload/exportMcHistoryMsgRecordExcel',
    method: 'get',
    data: 
    {
      tenantId: params.head.tenantId,
      orders:'',
      condition: formatCondition(params.body.sqlCondition)
    }
  })
}
